package com.jobs.assertF;

import cn.hutool.core.lang.Assert;

import java.lang.reflect.Array;
import java.util.Arrays;
import java.util.List;
import java.util.Optional;

/**
 * @Author 王博
 * @DateTime 2024-09-11 18:30
 */
public class AssertDemo {
    public static void main(String[] args) {
        List<String> list = Arrays.asList("1", "2", "3");
        Optional<String> optionalObject = list.stream().filter(item -> item.equals("21")).findFirst();
        //The call to 'isFalse' always fails, according to its method contracts
        Assert.isFalse(optionalObject.isPresent(), optionalObject.get());
//        AssertUtils.assertFalse(optionalObject.isPresent(), optionalObject.get());
    }
}
